﻿
@{
    ViewBag.Title = "Index";
}
<link href="~/ChatJs/css/jquery.chatjs.css" rel="stylesheet" />
<script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/signalr.js/2.2.2/jquery.signalR.min.js"></script>
<script src="~/signalr/Hubs" type="text/javascript"></script>
<script src="~/ChatJs/js/jquery.chatjs.min.js"></script>
<script type="text/javascript">
    $(function() {
     

        function initChat() {
            $.chat({
                // your user information
                userId: @User.Identity.Name, // this should be dynamic
                // text displayed when the other user is typing
                typingText: ' is typing...',
                // the title for the user's list window
                titleText: 'Chat',
                // text displayed when there's no other users in the room
                emptyRoomText: "There's no one around here. You can still open a session in another browser and chat with yourself :)",
                // the adapter you are using
                adapter: new SignalRAdapter()
            });
        }

        $.connection.hub.start().done(function () {
            initChat();
        });
    });
</script>